import { IPSPanelItemGroupLogic } from './ipspanel-item-group-logic';
import { IPSPanelItemLogic } from './ipspanel-item-logic';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSPanelItemGroupLogicImpl extends PSModelObjectImpl implements IPSPanelItemGroupLogic {
  get codeName(): string {
    return this.M.codeName;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get groupOP(): string {
    return this.M.groupOP;
  }

  get logicCat(): 'PANELVISIBLE' | 'ITEMENABLE' | 'ITEMBLANK' | 'SCRIPTCODE_CHANGE' | 'SCRIPTCODE_CLICK' | 'SCRIPTCODE_FOCUS' | 'SCRIPTCODE_BLUR' {
    return this.M.logicCat;
  }

  get logicType(): string {
    return this.M.logicType;
  }

  get memo(): string {
    return this.M.memo;
  }

  get name(): string {
    return this.M.name;
  }

  protected pspanelitemlogics: IPSPanelItemLogic[] | null = null;

  getPSPanelItemLogics(): IPSPanelItemLogic[] | null {
    if (this.pspanelitemlogics == null) {
      this.pspanelitemlogics = this.fillChildListModel(this.M.getPSPanelItemLogics, 'control.panel.IPSPanelItemLogic') as IPSPanelItemLogic[];
    }
    return this.pspanelitemlogics;
  }

  get psPanelItemLogics(): IPSPanelItemLogic[] | null {
    return this.getPSPanelItemLogics();
  }

  findPSPanelItemLogic(objKey: any): IPSPanelItemLogic | null {
    return this.getPSModel5('control.panel.IPSPanelItemLogic', this.getPSPanelItemLogics(), objKey) as IPSPanelItemLogic;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get notMode(): boolean {
    return this.M.notMode;
  }

  get cls(): string {
    return 'PSPanelItemGroupLogicImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'control.panel.IPSPanelItemGroupLogic') return true;
    return super.instanceof(cls);
  }
}
